/**   
 * @Title: SportteryBasketballChooseAct.java 
 * @Package com.esun.rabbit2.viewer.mainact.lotteryhallact.sportterybasketballapg 
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author: City Jiangsy@500wan.com   
 * @date: 2011-8-12 上午11:32:18  
 * Copyright: (C) 2011 Shenzhen E-sun Sky Net Technology Co.,ltd.
 */
package com.esun.rabbit2.viewer.mainact.lotteryhallact.sportterybasketballapg;

import com.esun.rabbit2.viewer.mainact.lotteryhallact.SportteryChooseActivity;
import com.esun.ui.R;

import android.os.Bundle;
import android.view.View;

/**
 * @ClassName: SportteryBasketballChooseAct
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author: City Jiangsy@500wan.com
 * @date: 2011-8-12 上午11:32:18
 * 
 */
public class SportteryBasketballChooseAct extends SportteryChooseActivity{

	
	public static int pageFlag = 0;
	/**
	 * @field:chooseListPage
	 * @description: 球类彩票的选择比赛界面(非Activity)
	 */
	private SportteryBasketballChooseList chooseListPage;
	
	/**
	 * @field:buyLotteryPage
	 * @description: 球类彩票的购买界面(非Activity)
	 */
	private SportteryBasketballBuyLottery buyLotteryPage;
	
	/**
	 * @field:viewChooseList
	 * @description: 球类彩票的选择比赛界面视图
	 */
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		uiInit();
	}

	/**
	 * @title:uiInit
	 * @description:初始化工作
	 */
	private void uiInit() {
		View viewChooseList = this.getLayoutInflater().inflate(R.layout.sportterybasketball_choose_list, null);
		View viewBuyLottery = this.getLayoutInflater().inflate(R.layout.sportterybasketball_buy_lottery, null);


		chooseListPage = new SportteryBasketballChooseList(this, viewChooseList);

		buyLotteryPage = new SportteryBasketballBuyLottery(this, viewBuyLottery);

		chooseListPage.setSportteryBuyLotteryPage(buyLotteryPage);
		buyLotteryPage.setSportteryChooseListPage(chooseListPage);
	}


	@Override
	protected View getChooseListPageView() {
		return chooseListPage.getView();
	}

	@Override
	protected View getBuyLotteryPageView() {
		return buyLotteryPage.getView();
	}

	@Override
	public int getPageFlag() {
		return pageFlag;
	}

	@Override
	public void setPageFlag(int i) {
		pageFlag = i;
	}

	@Override
	public int getActiveCount() {
		return buyLotteryPage.getActiveItemNum();
	}


}
